package vip.xiaonuo.smzq.modular.lifecycle.base;

import cn.hutool.core.util.StrUtil;
import lombok.Data;
import org.locationtech.jts.geom.Point;
import vip.xiaonuo.smzq.modular.lifecycle.util.CoordinateTranUtil;

/**
 * 拐点坐标--通用
 */
@Data
public class KqfwCoordinates {
    //拐点
    private String inflectionPoint;
    //x坐标
    private String x;
    //Y坐标
    private String y;
    //矿体标识
    private String oreBodyIdentification;
    //性质
    private String nature;
    /*x wgs84坐标*/
    private Double x84;
    /*y wgs84坐标*/
    private Double y84;

    public void initCoor84(Integer anasisType, CoordinateTranUtil coordinateTranUtil){
        if(!StrUtil.equals(this.getInflectionPoint(),"*")){
            Point point = coordinateTranUtil.tranToWgs84Point(anasisType,this.y,this.x);
            this.x84 = point.getCoordinates()[0].getX();
            this.y84 = point.getCoordinates()[0].getY();
        }

    }
}
